<%@page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>

    <script src="${pageContext.request.contextPath}/common/js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script>
        $(document).ready(function() {

            $("#username").focus(function() {
                $("#passwd").css("border-color", "")

                $(this).css("border-color", "yellow", "border", "4px silver solid");


            })


            $("#passwd").focus(function() {
                $("#username").css("border-color", "")

                $(this).css("border-color", "yellow");


            })

           $("input[isnull=n]").each(function(){
			 $(this).blur(function(){
			 	  if($(this).val()==""){
			 	    $(this).css("border-color","red").attr("error",$(this).attr("msg"));
			 	    $(this).parent().find("em").empty().end().append("<em>"+$(this).attr("msg")+"</em>").css({"font-size":"11px","color":"red"});
			 	  }
			 	  else{
			 	  	$(this).css("border-color","").attr("error","").parent().find("em").empty();//��մ�����Ϣ
			 	  }

			});
		});

		$("#submit").submit(function(){
                   
			 flag="y";
			  $("input[isnull=n]").each(function(){
			    if($(this).val()==""){
			 	    $(this).css("border-color","red").attr("error",$(this).attr("msg"));
			 	    $(this).parent().find("em").empty().end().append("<em>"+$(this).attr("msg")+"</em>").css({"font-size":"11px","color":"red"});
			 	  }
			 	  else{
			 	  	//$(this).css("border-color","").attr("error","").next().text("");//��մ�����Ϣ
			 	  	$(this).css("border-color","").attr("error","").parent().find("em").empty();
			 	  }
			  if($(this).attr("error").length>0)
			  	  flag="n";
			  });
			 if(flag=="y"){
			 	 
			  }
			 else
			 	 return false;
		});

        })



</script>

       <style>
body{
	padding:0;
	margin:0;
	background:#fff;
}
#loginbox{
	margin:10% auto;
	height:170px;
	width:300px;
	border:1px #ccc solid;
}
#title{
	padding:0;
	padding-left:5px;
	margin:0;
	background:#336699;
	height:37px;
	line-height:37px;
	font-family:Gulim;
	font-size:14px;
	color:#FFFF66;
	font-weight:bold;
	border-bottom:1px #ccc solid;
}
#loginbox ul{
	padding:0px;
               width: 231px;
               height: 79px;
               margin-bottom: 0px;
               margin-left: 17px;
               margin-top: 0px;
           }
#loginbox ul li{
	margin-top:3px;
	line-height:22px;
	list-style:none;
	font-weight:bold;
               line-height: normal;
               font-style: normal;
               font-variant: normal;
               font-size: 14px;
               font-family: simsun;
               width: 198px;
           }
.txtinput{
	height:15px;
	width:120px;
	border:2px silver solid;
}

.bottom{
	padding:2px;
	margin-right:40px;
	height:22px;
	width:55px;
	float:right;
	border:1px silver solid;
    margin-left : 7px;
     }
           .style1
           {
               color: #000000;
           }


       </style>
</head>
<body>

    <form id="form1" action="${pageContext.request.contextPath}/admin/tologin.do" method="post">
        
      <div id="loginbox">
                <div id="title">
                   管理员登陆
                            <ul>
                                <li><span><span class="style1">用户名:</span>
                                    <input name="username" id="username" class="txtinput" isnull=n  msg='用户名不能为空'  error="" />
                                    </span></li>
                                <li><span><span class="style1">密码：</span>
                                   <input name="passwd" type="password" id="passwd" class="txtinput" error="" isnull=n msg='密码不能为空'/>

                                    </span></li>
                                <li><span><span class="style1">验证码：</span>
                                   <input name="validWord" type="text" id="walidWord" class="txtinput" error="" isnull=n msg='验证码不能为空'/>
									<img border=0 src="${pageContext.request.contextPath}/authImg.do">
                                    </span></li>
                                <li>
                                    <input class="bottom" type="submit"id="submit" value="登陆"/>
                                </li>
                            </ul>


                </div>


            </div>

    </form>
</body>
</html>
